package myicesscheduler.web;

public class MyFileInfo
{
   private String dir;
   private String filename;
   private long fileSizeInByte;

   public void setDir( String dir )
   {
      this.dir = dir;
   }

   public String getDir()
   {
      return dir;
   }

   public void setFilename( String filename )
   {
      this.filename = filename;
   }

   public String getFilename()
   {
      return filename;
   }

   public void setFileSizeInByte( long fileSize )
   {
      this.fileSizeInByte = fileSize;
   }

   public long getFileSizeInByte()
   {
      return fileSizeInByte;
   }

   public double getFileSizeInKiloByte()
   {
      final double fracLength = 100.0;
      return Math.ceil( getFileSizeInByte() / 1024.0 * fracLength ) / fracLength ;
   }

   public double getFileSizeInMegaByte()
   {
      final double fracLength = 100.0;
      return Math.ceil( getFileSizeInKiloByte() / 1024.0 * fracLength ) / fracLength;
   }

}
